<?php
  include 'db-ubi.php';
  include 'functions-ubi.php';
?>
<!DOCTYPE html PUBLIC '-//W3C//DTD HTML 4.01 Transitional//EN'>
<html>
  <head>
    <meta HTTP-EQUIV='content-type' CONTENT='text/html; charset=UTF-8'>
<?php
  printf("    <title>Factoid Modification Page for #%s</title>\n",
         get_channel_name($globalChannelID));
?>
    <link rel='stylesheet' type='text/css' href='css/style.css'>
    <script language='Javascript' type='text/javascript' src='js/functions.js'></script>
    <script language='Javascript' type='text/javascript' src='js/overlibmws.js'></script>
    <script language='Javascript' type='text/javascript' src='js/overlibmws_filter.js'></script>
    <script language='Javascript' type='text/javascript' src='js/overlibmws_shadow.js'></script>
  </head>
  <body>
    <div class='main_div'>
    <form name='factoids' method='POST' action='index.php'>
<?php
  printf("    <input type='hidden' name='orderby_order' id='orderby_order' value='%s'>\n",
         $postOrderByOrder);
  printf("    <input type='hidden' name='orderby_column' id='orderby_column' value='%s'>\n",
         $postOrderByColumn);
  printf("    <input type='hidden' name='currentpage' id='currentpage' value='%s'>\n",
         $postCurrentPage);
  printf("    <input type='hidden' name='action' id='action' value='%s'>\n",
         $postAction);
  printf("    <input type='hidden' name='id' id='id' value=''>\n");
  printf("    <input type='hidden' name='edited_id' id='edited_id' value=''>\n");

  print_filtering_section($postAction, $postStatusValue, $postTypeValue, $postSearchCriteria, $postSearchValue, $postExactMatch);

  $sqlwherequery = build_where_section ($postAction, $postStatusValue, $postTypeValue, $postSearchCriteria, $postSearchValue, $postExactMatch, $globalChannelID);
  $sqlorderquery = build_order_section ($postOrderByColumn, $postOrderByOrder, $postCurrentPage, $startindex);

  print_navigation_section($globalTableName, $sqlwherequery, $postCurrentPage);

  print_results_section($globalTableName, $sqlwherequery, $sqlorderquery);
?>
    </form>
<?php
  print_footer_section();
?>
    </div>
    <br>
    <center><span class="col_white">Please visit the project home <a href="http://code.google.com/p/ubiquity-bot/">here</a>.</center>
  </body>
</html>
